﻿<Window x:Class="WirelessAccessPoint.WirelessAccessPointView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        xmlns:controls="clr-namespace:CODE.Framework.Wpf.Theme.Metro.Controls"
        xmlns:resources="clr-namespace:WirelessAccessPoint.Resources"
        Title="Wireless Access Point"
        Height="450"
        Width="500"
        MinHeight="450"
        MinWidth="500"
        Closed="Window_Closed">

    <Grid>
        <DockPanel>
            <Grid DockPanel.Dock="Top"
                  Style="{StaticResource TitleGridStyle}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Image Style="{StaticResource TitleImageStyle}" />
                <TextBlock Grid.Column="1"
                           Text="{x:Static resources:MessageResource.TitleMessage}"
                           Style="{StaticResource TitleTextBlockStyle}" />
            </Grid>

            <HeaderedContentControl DockPanel.Dock="Top"
                                    Header="{Binding}"
                                    HeaderTemplate="{StaticResource ConfigHeaderTemplate}"
                                    Content="{Binding}"
                                    ContentTemplate="{StaticResource ConfigContentTemplate}" />

            <TabControl DockPanel.Dock="Top">
                <TabItem Header="{x:Static resources:LabelResource.HostedNetworkLabel}"
                         Content="{Binding}"
                         ContentTemplate="{StaticResource StatusHostedNetworkTemplate}" />
                <TabItem Header="{x:Static resources:LabelResource.NetSharingPrivateLabel}"
                         Content="{Binding}"
                         ContentTemplate="{StaticResource StatusPrivateNetSharingTemplate}" />
                <TabItem Header="{x:Static resources:LabelResource.NetSharingPublicLabel}"
                         Content="{Binding}"
                         ContentTemplate="{StaticResource StatusPublicNetSharingTemplate}" />
                <TabItem Header="{Binding HostedNetworkPeers.Count, FallbackValue=0}"
                         HeaderStringFormat="{x:Static resources:LabelResource.HostedNetworkPeerLabel}"
                         Content="{Binding}"
                         ContentTemplate="{StaticResource StatusHostedNetworkPeersTemplate}" />
            </TabControl>
        </DockPanel>

        <Border Style="{StaticResource MaskBorderStyle}"
                Visibility="{Binding IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}">
            <StackPanel HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                <controls:CircularProgressAnimation IsActive="{Binding IsBusy}"
                                                    Style="{StaticResource MaskProgressStyle}" />
                <Label Content="{x:Static resources:MessageResource.WaitMessage}"
                       Style="{StaticResource MaskTitleLabelStyle}" />
                <Label Content="{Binding Message}"
                       Style="{StaticResource MaskMessageLabelStyle}" />
            </StackPanel>
        </Border>

    </Grid>
</Window>
